/* 引入依赖模块 */
// vue
import Vue from 'vue';
// vuex
import Router from 'vue-router';

/* 安装 */
Vue.use(Router);

/* 引入页面组件 */
// 主页
import Home from './pages/Home';

/* 暴露 store 对象 */
export default new Router({
    // 路由规则
    routes: [
        // 投资理财页
        { path: '/invest', component: () => import('./pages/Invest') },
        // 预约产品页
        { path: '/trade', component: () => import('./pages/Trade') },
        // 我的页
        { path: '/person', component: () => import('./pages/Person/Person')},
        // 邀请页
        { path: '/invite', component: () => import('./pages/Person/Invite')},
        // 我的邀请页
        { path: '/myInvite', component: () => import('./pages/Person/MyInvite')},
        // 认证页
        { path: '/attestation', component: () => import('./pages/Person/Attestation')},
        // 积分商品页
        { path: '/integral', component: () => import('./pages/Person/Integral')},
        // 设置页
        { path: '/setting', component: () => import('./pages/Person/Setting')},
        // 风险页
        { path: '/risk', component: () => import('./pages/Person/Risk')},
        // 我的信息页1
        { path: '/person1', component: () => import('./pages/Person/Person/Person1')},
        // 我的信息页2
        { path: '/person2', component: () => import('./pages/Person/Person/Person2')},
        // 注册页
        { path: '/register', component: () => import('./pages/Register')},
        // 登录页
        { path: '/login', component: () => import('./pages/Login/Login')},
        // 找回密码页
        { path: '/findPassword', component: () => import('./pages/Login/FindPassword')},
        //新闻详情页
        { path: '/newsDetail/:id', component: () => import('./pages/NewsDetail')},
		//关于页
        { path: '/about', component: () => import('./pages/Person/About/About')},
		//使用协议页
		{ path: '/agreement', component: () => import('./pages/Person/About/Agreement')},
		//关于我们页
		{ path: '/aboutUs', component: () => import('./pages/Person/About/AboutUs')},
        // 产品详情页
        { path: '/product/:id', component: () => import('./pages/ProductDetail')},
        // 主页
        { path: '/home', component: Home, meta: { isShow: true } },
        // 路由重定向
        { path: '*', redirect: '/home' }
    ]
})